package com.blue.blog.api.service.impl;

import com.blue.blog.api.mapper.CategoryMapper;
import com.blue.blog.api.pojo.Category;
import com.blue.blog.api.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    @Autowired
    private CategoryMapper mapper;

    @Override
    public List<Category> findAllCategory() {
        return mapper.findAllCategory();
    }

    @Override
    public Integer saveCategory(Category category) {
        return mapper.saveCategory(category);
    }

    @Override
    public Integer updateCategory(Category category) {
        return mapper.updateCategory(category);
    }

    @Override
    public Integer deleteCategoryById(Long id) {
        return mapper.deleteCategoryById(id);
    }
}
